import * as echarts from "echarts";

export const barChartInit_three = (chartDom: HTMLElement) => {
  const myChart: echarts.ECharts = echarts.init(chartDom);
  const option = {
    legend: {
      top: "bottom",
    },
    toolbox: {
      show: true,
      feature: {
        mark: { show: true },
      },
    },
    series: [
      {
        name: "Nightingale Chart",
        type: "pie",
        radius: [60, 140],
        center: ["50%", "50%"],
        roseType: "area",

        data: [
          { value: 40, name: "家用电器" },
          { value: 38, name: "户外运动" },
          { value: 32, name: "汽车用品" },
          { value: 30, name: "手机数码" },
        ],
      },
    ],
  };
  if (myChart) {
    myChart.setOption(option);
  }
};
